namespace FanG
{
    using System;
    using System.ComponentModel;
    using System.Drawing;

    [TypeConverter(typeof(ExpandableObjectConverter))]
    public class XLabelsAttributes : LabelsAttributes
    {
        private float _RotateAngle;
        private int _SampleSize;

        public XLabelsAttributes()
        {
            this._SampleSize = 1;
            this._RotateAngle = 30f;
        }

        public XLabelsAttributes(int SampleSize, float RotateAngle)
        {
            this._SampleSize = 1;
            this._RotateAngle = 30f;
            this.SampleSize = SampleSize;
            this.RotateAngle = RotateAngle;
        }

        public XLabelsAttributes(bool Show, Color ForeColor, Color BackColor, Font Font, string UnitText, string ValueFormat, Font UnitFont, int SampleSize, float RotateAngle)
        {
            this._SampleSize = 1;
            this._RotateAngle = 30f;
            this.SampleSize = SampleSize;
            this.RotateAngle = RotateAngle;
            base.Show = Show;
            base.Font = Font;
            base.ForeColor = ForeColor;
            base.BackColor = BackColor;
            base.UnitText = UnitText;
            base.ValueFormat = ValueFormat;
            base.UnitFont = Font;
        }

        [Description("XLabels RotateAngle\nX坐标文字旋转角度"), Category("Chartlet")]
        public float RotateAngle
        {
            get
            {
                return this._RotateAngle;
            }
            set
            {
                this._RotateAngle = value;
            }
        }

        [Category("Chartlet"), Description("XLabels SampleSize\nX坐标抽样率")]
        public int SampleSize
        {
            get
            {
                return this._SampleSize;
            }
            set
            {
                this._SampleSize = value;
            }
        }
    }
}

